<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2024 -->
<!-- Включены элементы разработанные Health Level Seven -->
<xsd:schema xmlns:mif="urn:hl7-org:v3/mif" xmlns="urn:hl7-org:v3" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:hl7-org:v3" elementFormDefault="qualified" xmlns:address="urn:hl7-ru:address" xmlns:fias="urn:hl7-ru:fias" xmlns:identity="urn:hl7-ru:identity">
	<!--
*****************************************************************************************************************
* XML schema for message type POCD_MT000040.
* Generated by XMLITS version 2.0
*
* Copyright (c) 2002, 2003, 2004, 2005 Health Level Seven. All rights reserved.
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*  1. Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*  2. Redistributions in binary form must reproduce the above copyright
*     notice, this list of conditions and the following disclaimer in the
*     documentation and/or other materials provided with the distribution.
*  3. All advertising materials mentioning features or use of this software
*     must display the following acknowledgement:
*       This product includes software developed by Health Level Seven.
*  THIS SOFTWARE IS PROVIDED BY HEALTH LEVEL SEVEN, INC. AND CONTRIBUTORS "AS IS" AND
*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
*  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
*  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
*  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
*  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
*  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
*  SUCH DAMAGE.
*
********************************************************************************************************************
	  -->
	<xsd:import namespace="urn:hl7-ru:fias" schemaLocation="fias.xsd"/>
	<xsd:import namespace="urn:hl7-ru:address" schemaLocation="address.xsd"/>
	<xsd:import namespace="urn:hl7-ru:identity" schemaLocation="identity.xsd"/>
	<xsd:include schemaLocation="coreschemas/datatypes.xsd"/>
	<xsd:include schemaLocation="coreschemas/voc.xsd"/>
	<xsd:include schemaLocation="coreschemas/NarrativeBlock.xsd"/>
	<!-- Блок "Сведения о пациенте" -->
	<xsd:complexType name="POCD_MT000040.RecordTarget">
		<xsd:sequence>
			<xsd:element name="patientRole" type="POCD_MT000040.PatientRole" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>роль пациента</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xsd:complexType>
	<xsd:complexType name="POCD_MT000040.PatientRole">
		<xsd:sequence>		
			<xsd:element name="id" type="II_id_patient" minOccurs="2" maxOccurs="2">
				<xsd:annotation>
					<xsd:documentation>уникальный идентификатор пациента в МИС</xsd:documentation>
					<xsd:documentation>СНИЛС пациента</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element ref="identity:IdentityDoc" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>документ, удостоверяющий личность пациента (серия, номер, кем и когда выдан)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>			
			<xsd:element ref="identity:InsurancePolicy" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>полис ОМС</xsd:documentation>
				</xsd:annotation>
			</xsd:element>			
			<xsd:element name="addr" type="AD_Patient" minOccurs="1" maxOccurs="2">
				<xsd:annotation>
					<xsd:documentation>адрес</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="telecom" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>контакты пациента</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="TEL">
							<xsd:attribute name="value" type="url" use="required"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="patient" type="POCD_MT000040.Patient" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>пациент (человек)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="providerOrganization" type="POCD_MT000040.Organization_Patient" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>организация, оказывающая медицинскую помощь</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xsd:complexType>
	<xsd:complexType name="POCD_MT000040.Patient">
		<xsd:sequence>
			<xsd:element name="name" type="PN" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>ФИО пациента</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="administrativeGenderCode" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>пол пациента</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="CE_non_elements">
							<xsd:attribute name="code" type="cs" use="required"/>
							<xsd:attribute name="codeSystem" type="uid" use="required" fixed="1.2.643.5.1.13.13.11.1040"/>
							<xsd:attribute name="codeSystemName" type="st" use="required"/>
							<xsd:attribute name="codeSystemVersion" type="st" use="required"/>
							<xsd:attribute name="displayName" type="st" use="required"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="birthTime" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>дата рождения пациента</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="TS">
							<xsd:attribute name="value" type="ts" use="required"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xsd:complexType>

	<!-- Блок "Сведения об организации, оказывающей медицинскую помощь" -->
	<xsd:complexType name="POCD_MT000040.Organization_Patient">
		<xsd:choice minOccurs="1">
			<xsd:sequence>
				<xsd:element name="id" minOccurs="1" maxOccurs="2">
					<xsd:annotation>
						<xsd:documentation>уникальный идентификатор медицинской организации</xsd:documentation>
						<xsd:documentation>лицензия на осуществление медицинской деятельности (номер, выдавший лицензию орган и дата регистрации)</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:complexContent>
							<xsd:restriction base="II">
								<xsd:attribute name="root" type="uid" use="optional"/>
								<xsd:attribute name="extension" type="st" use="optional"/>
								<xsd:attribute name="assigningAuthorityName" type="st" use="optional"/>
								<xsd:attribute name="displayable" type="bl" use="prohibited"/>
								<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
							</xsd:restriction>
						</xsd:complexContent>
					</xsd:complexType>
				</xsd:element>
				<xsd:element ref="identity:Props" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>реквизиты организации</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="identity:Dept" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>наименование структурного подразделения</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="identity:addrDept" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>адрес структурного подразделения</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="name" type="ON" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>наименование медицинской организации или ФИО индивидуального предпринимателя</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="telecom" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>контакты медицинской организации или индивидуального предпринимателя</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:complexContent>
							<xsd:restriction base="TEL">
								<xsd:attribute name="value" type="url" use="required"/>
								<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
							</xsd:restriction>
						</xsd:complexContent>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="addr" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>адрес медицинской организации или индивидуального предпринимателя</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:choice minOccurs="1">
							<xsd:group ref="AD"/>
						</xsd:choice>
						<xsd:attribute name="use" use="optional" type="set_PostalAddressUse"/>
						<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:choice>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xsd:complexType>
	<!-- Блок "Адрес пациента" -->
	<xsd:complexType name="AD_Patient">
		<xsd:choice minOccurs="0">
			<xsd:sequence>
				<xsd:element ref="address:Type" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>тип адреса пациента</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="streetAddressLine" type="adxp.streetAddressLine" minOccurs="1"
					maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>адрес текстом</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="address:stateCode" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>код субъекта РФ</xsd:documentation>
					</xsd:annotation>
				</xsd:element>																		
				<xsd:element name="postalCode" type="adxp.postalCode" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>почтовый индекс</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="fias:Address" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>коды адреса по ФИАС</xsd:documentation>
					</xsd:annotation>
				</xsd:element>									
			</xsd:sequence>
		</xsd:choice>
		<xsd:attribute name="use" use="optional" type="set_PostalAddressUse"/>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="optional"/>
	</xsd:complexType>
</xsd:schema>